This invention relates to a programmable controller, its CPU and communication units and a method of its control.
Programmable controllers (PLCs) are being used as control devices in factory automation (FA). Such PLCs are structured as an appropriate combination of a plurality of units such as a power source unit for supplying electrical power, a CPU unit for controlling the PLC as a whole, an input unit for inputting signals from switches and sensors positioned strategically for the FA devices, an output unit for outputting control signals to actuators or the like, and a communication unit for connecting to a communication network.
The control of a PLC by its CPU unit includes accepting signals inputted through the input unit into the I/O memory of the CPU unit (“IN-refresh”), carrying out a logical calculation according to a user program preliminarily registered in a user program language such as a ladder language (“calculation”), writing the result of such calculations in the I/O memory for transmitting it to the output unit (“OUT-refresh”) and thereafter exchanging data through the communication unit with the other PLCs on the same communication network or through communication ports provided to the CPU unit with external devices (“peripheral processing”) in a cyclic mode of operation. Operations of the IN-refresh and OUT-refresh are sometimes carried out together.
In order to improve the safety and reliability of a system, it has been known to prepare a network system in a double structure. Japanese Patent Publication Tokkai 2001-156818, for example, discloses a ring-shaped transmission system with a double-loop structure of optical cables. With such a double-loop structure, nodes such as PLCs connected to such a ring-shaped transmission route can maintain their mutually connected condition even if a portion of the transmission route happens to be broken and hence interruptions in communication due to such a breakage can be prevented and the reliability of the network is improved.
Each PLC is connected to the network through its communication unit (or network unit) and exchanges data with the other PLCs or nodes through this communication unit. Thus, interruptions in communication due to a breakage in the transmission route can be prevented by using a network system with a double loop structure but the problem of interrupted communication remains if an abnormal condition occurs in the communication unit itself because the nodes (such as PLCs) connected to the network through such a communication unit become unable to exchange data.
In view of the above, if a PLC system is required to be able to continue communication processes even in the presence of a trouble with a communication unit of the controller system with a redundant double loop structure, it has been necessary to double up the communication unit by transmitting the same data twice by the user program. Explained more in detail, this is done by providing the PLC with two communication units having different node numbers and different unit numbers. When such two communication units are used to exchange data with a different node by the so-called data link method, different memory areas (referred to as data link areas) within the CPU unit are used for the data exchange for the two communication units. For this reason, the CPU unit is required to carry out data exchanges and other processes with two communication units. In other words, the user program for the CPU unit must be created so as to carry out a similar process twice regarding the two different memory areas assigned to the two communication units when a data link area is to be accessed. This means that there is an increased load on the calculation process for the execution of such a user program.
A similar problem occurs when a user program is created for communicating with other nodes connected to the network. When a user program is created by using commands (communication commands) for transmitting and receiving messages to and from another node, the node number and the unit number associated with the addressee communication unit must be written in as the operand for the communication command. Thus, the user program must be prepared such that each message will be transmitted to two different communication units by specifying the node number and the unit number of each of them.
If each communication unit is thus doubled up at each node on the network, communication need not be interrupted even when there is an abnormality situation in one of the networks, but the user program for the CPU unit must be executed twice for each unit.